projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0a0fd0
)
Fix default read of boolean opts with '1' as the default.
author
robertlipe
<robertlipe@gmail.com>
Fri, 3 Jan 2014 05:29:49 +0000
(
05:29
+0000)
committer
robertlipe
<robertlipe@gmail.com>
Fri, 3 Jan 2014 05:29:49 +0000
(
05:29
+0000)
gpsbabel/gui/format.h
patch
|
blob
|
history
diff --git
a/gpsbabel/gui/format.h
b/gpsbabel/gui/format.h
index 8c1dead625f3c6f6c5bdbc1978fac46f0b3f2813..65d93e6352c228b1566e9a8500f4a324dfe141da 100644
(file)
--- a/
gpsbabel/gui/format.h
+++ b/
gpsbabel/gui/format.h
@@
-58,7
+58,13
@@
public:
defaultValue_(defaultValue), minValue_(minValue), maxValue_(maxValue), html_(html)
{
value_ = QVariant();
- isSelected_ = false;
+ // Boolean values pay more atention to 'selected' than value. Make
+ // them match here. For non-bools, just make them unchecked.
+ if (type_ == OPTbool && defaultValue.toBool() == true) {
+ isSelected_ = true;
+ } else {
+ isSelected_ = false;
+ }
}
FormatOption(const FormatOption & c)